Filter deleted objects

Hello,

I know from where to get the answer! thanks guys for tremendous support.

I was asked to fill "Status" attribute as "Req_deleted" for deleted requirements. I could see deleted ones by doing so View-> show->Deletions. Now how do I filter them ? as the list if huge manual update is too tiresome. If I do undo deletion after sometime is get confused which was deleted.

 

Looking for the easy way to filter all deleted ones and fill the attribute "Status" with "Req_Deleted". or export in excel only deleted ones and import back with updated attribute.

 

Looking forward for your kind support.

 

Regards,

Jayashree.


JayashreePana - Thu Mar 24 04:18:42 EDT 2016

Re: Filter deleted objects
DOORSHAM - Thu Mar 24 10:03:17 EDT 2016

Try something like the following

 

 

//filter on deleted objects
/*Demo*/
showDeletedObjects(true)
Object o
Module m = current
filtering off
for o in m do
{ if(isDeleted(o)) accept o else reject o
}
filtering on

Re: Filter deleted objects
JayashreePana - Thu Mar 24 10:40:46 EDT 2016

DOORSHAM - Thu Mar 24 10:03:17 EDT 2016

Try something like the following

 

 

//filter on deleted objects
/*Demo*/
showDeletedObjects(true)
Object o
Module m = current
filtering off
for o in m do
{ if(isDeleted(o)) accept o else reject o
}
filtering on

Hi,

Thanks a lot for the reply.

I could filter for deleted ones but unable to modify them error msg "cannot modify attribute on a deleted object".  How do I modify them

showDeletedObjects(true)
 Object o
 Module m = current
 filtering off
string toAttr = "Status"
 for o in m do
 { if(isDeleted(o)){ accept o
o.toAttr = "Deleted"""}
else reject o
 }
 filtering on

 

Regards,

Jayashree

Re: Filter deleted objects
Richard_Hesketh - Sat Mar 26 17:15:17 EDT 2016

JayashreePana - Thu Mar 24 10:40:46 EDT 2016

Hi,

Thanks a lot for the reply.

I could filter for deleted ones but unable to modify them error msg "cannot modify attribute on a deleted object".  How do I modify them

showDeletedObjects(true)
 Object o
 Module m = current
 filtering off
string toAttr = "Status"
 for o in m do
 { if(isDeleted(o)){ accept o
o.toAttr = "Deleted"""}
else reject o
 }
 filtering on

 

Regards,

Jayashree

Inside the if (isdeleted(o)) block, instead of 'accept o', you could 'undelete o', then assign to o.toAttr, then 'softDelete o', if that is the desired end state.

 

Re: Filter deleted objects
JayashreePana - Mon Apr 04 10:02:22 EDT 2016

Richard_Hesketh - Sat Mar 26 17:15:17 EDT 2016

Inside the if (isdeleted(o)) block, instead of 'accept o', you could 'undelete o', then assign to o.toAttr, then 'softDelete o', if that is the desired end state.

 

Hi,

Thanks for your reply.

It is failed when complete section is deleted! like

1 Heading1

1.1 Heading2

Heading 2 cannot do undelete unless Heading1 undeleted!.

-R-W- DXL: <Line:8> cannot modify attribute on a deleted object

-R-E- DXL: <Line:9> cannot delete Object: no access to source object

 

 Looking for the support.

 

Otherwise with the above script I could change many of requirements. If it is not so easy I will try to do it manually.

 

Regards,

Jayashree